/**
  * Author: Mei
  * Date: 2020-10-15 13:57
  * Description: 时间类的声明
  *
  */
#include <iostream>
#include <ostream>
#include <iostream>

class CTime {
private:
    unsigned short int hour;
    unsigned short int second;
    unsigned short int minute;
public:
    CTime() {}

    CTime(int h = 0, int s = 0, int m = 0);

    //比较运算符
    bool operator>(CTime &t);

    bool operator<(CTime &t);

    bool operator>=(CTime &t);

    bool operator<=(CTime &t);

    bool operator==(CTime &t);

    bool operator!=(CTime &t);

    //二目运算符的重载
    CTime &operator+(CTime &t);

    CTime &operator-(CTime &t);

    CTime &operator+(int s);

    CTime &operator-(int s);

    //一目运算符的重载
    CTime &operator++(int);

    CTime &operator++();

    CTime &operator--(int);

    CTime &operator--();

    //赋值运算符的重载
    CTime &operator+=(CTime &t);

    CTime &operator-=(CTime &t);

    CTime &operator+=(int s);

    CTime &operator-=(int s);

    //输入和输出友元函数重载
    friend istream &operator>>(istream &in, CTime &t);

    friend ostream &operator<<(ostream &out, const CTime &t);
};
